﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserPermission.aspx.cs" Inherits="bts_webapp.UserPermission" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <script language="javascript" type="text/javascript">
        function GetRadWindow() 
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function CloseWindow() {
            GetRadWindow().close();
        }
    </script>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="scriptMan" runat="server" />
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="combo">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                 <telerik:AjaxSetting AjaxControlID="btSubmit">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="btSubmit" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Windows7" />

        <span>Chọn loại người dùng:</span>
        <telerik:RadComboBox ID="combo" Skin="Windows7" runat="server" AutoPostBack="true" OnSelectedIndexChanged="combo_SelectedIndexChanged">
            <Items>
                <telerik:RadComboBoxItem Text="Admin" Value="Admin" />
                <telerik:RadComboBoxItem Text="Nhân viên tổ ViBa" Value="User1" />
                <telerik:RadComboBoxItem Text="Nhân viên các đài/trạm" Value="User2" />
            </Items>
        </telerik:RadComboBox>

        <telerik:RadGrid Skin="Windows7"  runat="server" ID="RadGrid1" AutoGenerateColumns="false" 
            AllowPaging="false" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound">
            <MasterTableView>
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="IsActive" DataField="IsActive" HeaderText="Cho phép">
                        <ItemTemplate>
                            <asp:CheckBox ID="cbActive" runat="server" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                    <telerik:GridBoundColumn DataField="Page" HeaderText="Trang" UniqueName="Page" />
                    <telerik:GridBoundColumn DataField="PageDescription" HeaderText="Mô tả trang" UniqueName="PageDescription" />
                    <telerik:GridTemplateColumn DataField="IsEdit" HeaderText="Quyền chỉnh sữa" UniqueName="IsEdit">
                        <ItemTemplate>
                            <asp:CheckBox ID="cbEdit" runat="server" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <br />
        <telerik:RadButton Skin="Windows7" ID="btSubmit" runat="server" OnClick="btSubmit_Click" Text="Lưu thay đổi" />
    </div>
    </form>
</body>
</html>
